#ifndef LOGIN_H
#define LOGIN_H

#include "loginDialog.h"
#include "rigist.h"
#include <QFile>
#include <QTextStream>
#include <QCloseEvent>
#include "gheaders.h"
#include <QErrorMessage>
#include <QFileDialog>
#include <QDir>
#include "tcp_routines.h"
#include <QStringList>
#include <QMouseEvent>
#include "loginThread.h"
class Login:public QDialog,public Ui_GeeBox
{
    Q_OBJECT
public:
    Login(QString tmp);
    int ctl_sock;
    QStringList userList;
    Rigist* rig;  
    LoginThread* LT;
protected:
    void closeEvent(QCloseEvent *event);
    void mousePressEvent(QMouseEvent *);        //自定义一个鼠标点击事件函数
    void mouseMoveEvent(QMouseEvent * event);   //实现窗口拖拽
private:
    QString workDir;           //程序当前的工作目录
    QPoint dragPosition;                        //定义一个QPoint的成员变量
signals:
    void hasloged(int fd,QString userName);
    void waitFinish();
    void startWait();
public slots:
    void login();
    void UserNameSelected(QString);
    void Regist();
    void logFailed(int);
    void logSucessed(int fd,QString userName);
};

#endif // LOGIN_H
